From fb09c248c059cef4fdf6b230ba7b5f697a3210bf Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 15 Nov 2007 04:04:16 +0000 Subject: [PATCH] Restore (optional) "old style" icon mapping for Geocaching on Garmins. --- garmin.c | 3 +++ garmin_tables.c | 2 +- util.c | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/garmin.c b/garmin.c index 6faaf9fe7..57070d968 100644 --- a/garmin.c +++ b/garmin.c @@ -734,6 +734,9 @@ waypoint_write(void) if (global_opts.smart_names && wpt->gc_data.diff && wpt->gc_data.terr) { +#if 0 +xasprintf(&src, "%s %s", &wpt->shortname[2], src); +#endif snprintf(obuf, sizeof(obuf), "%s%d/%d %s", get_gc_info(wpt), wpt->gc_data.diff, wpt->gc_data.terr, diff --git a/garmin_tables.c b/garmin_tables.c index 4dadeae70..11a064ad0 100644 --- a/garmin_tables.c +++ b/garmin_tables.c @@ -184,7 +184,7 @@ icon_mapping_t garmin_icon_table[] = { * .... * { -2, 8192, "Custom 511" }, */ -#if 0 +#if 1 /* Since Garmin is busily adding icons to new units, we have to hide * these so we can pass them through to the new entries. 6/2/07 robertl */ diff --git a/util.c b/util.c index 3a24db4ff..fc3e74e21 100644 --- a/util.c +++ b/util.c @@ -897,6 +897,7 @@ get_cache_icon(const waypoint *waypointp) default: break; } + switch (waypointp->gc_data.container) { case gc_micro: return "Micro-Cache"; @@ -904,6 +905,11 @@ get_cache_icon(const waypoint *waypointp) default: break; } + + if (waypointp->gc_data.diff > 1) { + return "Geocache"; + } + return NULL; } -- 2.30.2